package com.qfedu.smart_community.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @TableName menus
 */
public class Menus implements Serializable {
    /**
     * 菜单编号
     */
    private Integer menuId;

    /**
     * 菜单编码
     */
    private String menuCode;

    /**
     * 菜单名称
     */
    private String menuName;

    /**
     * 菜单排序序号
     */
    private Integer menuOrder;

    /**
     * 菜单级别
     */
    private Integer menuLevel;

    /**
     * 一级菜单图标
     */
    private String menuIcon;

    /**
     * 父级菜单编码
     */
    private String parentMenuCode;

    /**
     * 点击菜单请求的链接url
     */
    private String menuUrl;

    /**
     * 菜单状态： 1 启用，0 停用
     */
    private Integer menuState;

    //子菜单
    private List<Menus> children=new ArrayList<>();


    private static final long serialVersionUID = 1L;

    public List<Menus> getChildren() {
        return children;
    }

    public void setChildren(List<Menus> children) {
        this.children = children;
    }

    /**
     * 菜单编号
     */
    public Integer getMenuId() {
        return menuId;
    }

    /**
     * 菜单编号
     */
    public void setMenuId(Integer menuId) {
        this.menuId = menuId;
    }

    /**
     * 菜单编码
     */
    public String getMenuCode() {
        return menuCode;
    }

    /**
     * 菜单编码
     */
    public void setMenuCode(String menuCode) {
        this.menuCode = menuCode;
    }

    /**
     * 菜单名称
     */
    public String getMenuName() {
        return menuName;
    }

    /**
     * 菜单名称
     */
    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    /**
     * 菜单排序序号
     */
    public Integer getMenuOrder() {
        return menuOrder;
    }

    /**
     * 菜单排序序号
     */
    public void setMenuOrder(Integer menuOrder) {
        this.menuOrder = menuOrder;
    }

    /**
     * 菜单级别
     */
    public Integer getMenuLevel() {
        return menuLevel;
    }

    /**
     * 菜单级别
     */
    public void setMenuLevel(Integer menuLevel) {
        this.menuLevel = menuLevel;
    }

    /**
     * 一级菜单图标
     */
    public String getMenuIcon() {
        return menuIcon;
    }

    /**
     * 一级菜单图标
     */
    public void setMenuIcon(String menuIcon) {
        this.menuIcon = menuIcon;
    }

    /**
     * 父级菜单编码
     */
    public String getParentMenuCode() {
        return parentMenuCode;
    }

    /**
     * 父级菜单编码
     */
    public void setParentMenuCode(String parentMenuCode) {
        this.parentMenuCode = parentMenuCode;
    }

    /**
     * 点击菜单请求的链接url
     */
    public String getMenuUrl() {
        return menuUrl;
    }

    /**
     * 点击菜单请求的链接url
     */
    public void setMenuUrl(String menuUrl) {
        this.menuUrl = menuUrl;
    }

    /**
     * 菜单状态： 1 启用，0 停用
     */
    public Integer getMenuState() {
        return menuState;
    }

    /**
     * 菜单状态： 1 启用，0 停用
     */
    public void setMenuState(Integer menuState) {
        this.menuState = menuState;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Menus other = (Menus) that;
        return (this.getMenuId() == null ? other.getMenuId() == null : this.getMenuId().equals(other.getMenuId()))
            && (this.getMenuCode() == null ? other.getMenuCode() == null : this.getMenuCode().equals(other.getMenuCode()))
            && (this.getMenuName() == null ? other.getMenuName() == null : this.getMenuName().equals(other.getMenuName()))
            && (this.getMenuOrder() == null ? other.getMenuOrder() == null : this.getMenuOrder().equals(other.getMenuOrder()))
            && (this.getMenuLevel() == null ? other.getMenuLevel() == null : this.getMenuLevel().equals(other.getMenuLevel()))
            && (this.getMenuIcon() == null ? other.getMenuIcon() == null : this.getMenuIcon().equals(other.getMenuIcon()))
            && (this.getParentMenuCode() == null ? other.getParentMenuCode() == null : this.getParentMenuCode().equals(other.getParentMenuCode()))
            && (this.getMenuUrl() == null ? other.getMenuUrl() == null : this.getMenuUrl().equals(other.getMenuUrl()))
            && (this.getMenuState() == null ? other.getMenuState() == null : this.getMenuState().equals(other.getMenuState()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMenuId() == null) ? 0 : getMenuId().hashCode());
        result = prime * result + ((getMenuCode() == null) ? 0 : getMenuCode().hashCode());
        result = prime * result + ((getMenuName() == null) ? 0 : getMenuName().hashCode());
        result = prime * result + ((getMenuOrder() == null) ? 0 : getMenuOrder().hashCode());
        result = prime * result + ((getMenuLevel() == null) ? 0 : getMenuLevel().hashCode());
        result = prime * result + ((getMenuIcon() == null) ? 0 : getMenuIcon().hashCode());
        result = prime * result + ((getParentMenuCode() == null) ? 0 : getParentMenuCode().hashCode());
        result = prime * result + ((getMenuUrl() == null) ? 0 : getMenuUrl().hashCode());
        result = prime * result + ((getMenuState() == null) ? 0 : getMenuState().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", menuId=").append(menuId);
        sb.append(", menuCode=").append(menuCode);
        sb.append(", menuName=").append(menuName);
        sb.append(", menuOrder=").append(menuOrder);
        sb.append(", menuLevel=").append(menuLevel);
        sb.append(", menuIcon=").append(menuIcon);
        sb.append(", parentMenuCode=").append(parentMenuCode);
        sb.append(", menuUrl=").append(menuUrl);
        sb.append(", menuState=").append(menuState);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}